home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / FindDialog.h < prev    next >
C/C++ Source or Header  |  1992-07-06  |  1KB  |  59 lines

  1. #ifndef FindDialog_First
  2. #ifdef __GNUG__
  3. //pragma once
  4. #pragma interface
  5. #endif
  6. #define FindDialog_First
  7.   
  8. #include "Dialog.h"
  9.  
  10. class RegularExp;
  11. class TextView;
  12. class TextField;
  13. class OneOfCluster;
  14. class ManyOfCluster;
  15. class VObject;
  16.  
  17. //---- id's ----------------------------------------------------------------
  18.  
  19. const int cIdFind             = cIdFirstUser + 1,
  20.       cIdDoFind           = cIdFirstUser + 2,
  21.       cIdFindOpt          = cIdFirstUser + 3,
  22.         cIdIgnCase    = cIdFindOpt,
  23.         cIdMatchWord  = cIdFindOpt   + 1,
  24.       cIdFindMode         = cIdFirstUser + 13,
  25.         cIdForward    = cIdFindMode,
  26.         cIdBackward   = cIdFindMode  + 1;
  27.  
  28. //---- FindDialog --------------------------------------------------------------
  29.  
  30. class FindDialog : public Dialog {
  31. public:
  32.     MetaDef(FindDialog);
  33.     FindDialog(char *title);
  34.     ~FindDialog();
  35.     void SetTextView(TextView *tvp);
  36.     void FindAgain();
  37.     char *GetSearchPattern();
  38.     virtual bool DoFind(char *str, bool forward, bool msg= TRUE);
  39.  
  40. protected:
  41.     VObject *DoMakeContent();
  42.     void DoSetup();
  43.     void DoSetDefaults();
  44.     void Control(int id, int, void *v);
  45.     void SendDown(int id, int, void *v);
  46.     bool Compile(char *pattern);
  47.  
  48. protected:
  49.     RegularExp *rex;
  50.     TextView *tvp;
  51.     TextField *ei1;
  52.     OneOfCluster *modecl;
  53.     ManyOfCluster *optionscl;
  54.     VObject *find;
  55.     bool atEnd, atBegin;
  56. };
  57.  
  58. #endif
  59.